namespace eJack.Utility
{
	//-------------------------------------------------------------------------
	static public class CxArray
	{
		//-------------------------------------------------------------------------
		/// <summary>
		/// Returns true if the given array contains the given element
		/// </summary>
		/// <typeparam name="T">type of the element in the array</typeparam>
		/// <param name="array">an array to search in</param>
		/// <param name="element">an element to seek for</param>
		static public bool Contains<T>(T[] array, T element)
		{
			for (int i = 0; i < array.Length; i++)
			{
				if (CxUtils.Compare(array[i], element))
					return true;
			}
			return false;
		}
		//-------------------------------------------------------------------------
	}
}
